<div class="page">
        <?php
            $content = heading($page['pag_title'], 1);
            $content .= '<p>' . $page['pag_content'] .'</p>';
            if ($page['auction'] != FALSE) {
                $content .= renderAuction($page['auction'], 'auction-view');
                if ($page['hasDocuments']) {
                    $content .= '<div class="documents">';
                    $content .= heading('Documentatia licitatiei', 2);
                    $content .= '<ul>';           
                    foreach ($page['documents'] as $document) {
                        $content .= '<li><a href=' . base_url() . $document['doc_path'] . ' target="_blank">' .  '<p>' . $document['doc_description'] . '</p></a></li>';
                    }
                    $content .= '</ul>';
                    $content .= '</div>';
                }
                $content .= $page['links'];
            }
            echo $content;
        ?>
    </div>
</div>
